<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2018/12/11
 * Time: 10:18
 */

namespace app\storage\model;


use think\Model;

class StaffStorageModel extends Model
{
    protected $table = 'iwh_staff_storage';
    protected $pk = 'id';

    public function Storage()
    {
        return $this->belongsTo('StorageModel', 'storage_uuid', 'uuid')->bind('name,uuid');
    }

    public function getStaffStorage($userId)
    {
        $where['user_id'] = $userId;
        $storageList = $this->where($where)->column('storage_uuid');
        return $storageList;
    }

}